
export function DateToStr(date) {
     var year = date.getFullYear();//年
     var month = date.getMonth();//月
     var day = date.getDate();//日
     return year + "-" +
         ((month + 1) > 9 ? (month + 1) : "0" + (month + 1)) + "-" +
         (day > 9 ? day : ("0" + day)) 
         
 }
 export function DateMinus(date1,date2){//date1:小日期   date2:大日期
    　　var sdate = new Date(date1); 
    　　var now = new Date(date2); 
    　　var days = now.getTime() - sdate.getTime(); 
    　　var day = parseInt(days / (1000 * 60 * 60 * 24)); 
    　　return day; 
    }
  